#pragma once
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "Timer.h"


LRESULT CALLBACK WndProc(HWND hWnd , UINT msg , WPARAM wParam , LPARAM lParam ) ;
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrev,LPSTR lpCmd, int showCmd ) ;

class CWin32
{
	CWin32(void);
public:
	virtual ~CWin32(void) ;
	CWin32(int widith , int height ) ;
	
	bool init(HINSTANCE instanceHandle,int show) ;
	virtual LRESULT msgPump(UINT msg, WPARAM wParam, LPARAM lParam);
	int run() ;

	inline HINSTANCE getAppInst() { return m_hInstance ; }
	inline HWND      getMainWnd() { return m_windowHandle ; }

	inline void setDevice() ;
	
	inline void quitApp(bool b) { m_isRunning = b  ; }
	inline void pauseApp(bool b) { m_isPaused = b ; }



protected:
	HINSTANCE	m_hInstance ;
	HWND		m_windowHandle ;
	int			m_widith , m_height ;
	bool		m_fullscreen ;

	bool		m_isRunning ;
	bool		m_isPaused ;
	CTimer		m_counter ;

};

